package com.model.dao;

// Generated Sep 16, 2013 2:49:26 PM by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * ChildcatalogTable generated by hbm2java
 */
@Entity
@Table(name = "childcatalog_table", catalog = "shoppingcart_schema")
public class ChildcatalogTable implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8758460107711685946L;
	private int childItemId;
	private MastercatalogTable mastercatalogTable;
	private String childItemSize;
	private BigDecimal childItemPrice;
	private BigDecimal childItemSrp;
	private byte[] childItemImage;
	private String childItemImagePath;
	private Set<OrderItemsTable> orderItemsTables = new HashSet<OrderItemsTable>(
			0);
	private InventoryTable inventoryTable;

	public ChildcatalogTable() {
	}

	public ChildcatalogTable(int childItemId) {
		this.childItemId = childItemId;
	}

	public ChildcatalogTable(int childItemId,
			MastercatalogTable mastercatalogTable, String childItemSize,
			BigDecimal childItemPrice, BigDecimal childItemSrp,
			byte[] childItemImage, String childItemImagePath,
			Set<OrderItemsTable> orderItemsTables, InventoryTable inventoryTable) {
		this.childItemId = childItemId;
		this.mastercatalogTable = mastercatalogTable;
		this.childItemSize = childItemSize;
		this.childItemPrice = childItemPrice;
		this.childItemSrp = childItemSrp;
		this.childItemImage = childItemImage;
		this.childItemImagePath = childItemImagePath;
		this.orderItemsTables = orderItemsTables;
		this.inventoryTable = inventoryTable;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "childItem_id", unique = true, nullable = false)
	public int getChildItemId() {
		return this.childItemId;
	}

	public void setChildItemId(int childItemId) {
		this.childItemId = childItemId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "masterItem_Id")
	public MastercatalogTable getMastercatalogTable() {
		return this.mastercatalogTable;
	}

	public void setMastercatalogTable(MastercatalogTable mastercatalogTable) {
		this.mastercatalogTable = mastercatalogTable;
	}

	@Column(name = "childItem_size", length = 45)
	public String getChildItemSize() {
		return this.childItemSize;
	}

	public void setChildItemSize(String childItemSize) {
		this.childItemSize = childItemSize;
	}

	@Column(name = "childItem_price", precision = 10)
	public BigDecimal getChildItemPrice() {
		return this.childItemPrice;
	}

	public void setChildItemPrice(BigDecimal childItemPrice) {
		this.childItemPrice = childItemPrice;
	}

	@Column(name = "childItem_srp", precision = 10)
	public BigDecimal getChildItemSrp() {
		return this.childItemSrp;
	}

	public void setChildItemSrp(BigDecimal childItemSrp) {
		this.childItemSrp = childItemSrp;
	}

	@Column(name = "childItem_image")
	public byte[] getChildItemImage() {
		return this.childItemImage;
	}

	public void setChildItemImage(byte[] childItemImage) {
		this.childItemImage = childItemImage;
	}

	@Column(name = "childItem_imagePath", length = 300)
	public String getChildItemImagePath() {
		return this.childItemImagePath;
	}

	public void setChildItemImagePath(String childItemImagePath) {
		this.childItemImagePath = childItemImagePath;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "childcatalogTable")
	public Set<OrderItemsTable> getOrderItemsTables() {
		return this.orderItemsTables;
	}

	public void setOrderItemsTables(Set<OrderItemsTable> orderItemsTables) {
		this.orderItemsTables = orderItemsTables;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "childcatalogTable")
	public InventoryTable getInventoryTable() {
		return this.inventoryTable;
	}

	public void setInventoryTable(InventoryTable inventoryTable) {
		this.inventoryTable = inventoryTable;
	}

}
